<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="list" title="oooo" abc="sssss">
        我是一个div
    </div>



    <script>
        var list = document.querySelector('#list')

        // console.log(list.abc) //对象，属性这种方法，无法获取、设置自定义属性
        // console.log(list.getAttribute("title"))
        // list.setAttribute('title','wwwww')

        // console.log(list.getAttribute("abc"))

        list.removeAttribute('abc')


        //className  //class

        // list.style.fontSize='22px'
        // list.style.cssFloat= 'left'

        // list.style.bakcground= 'red'
        list.style.cssText="background:red;color:blue;font-size:22px;"
    </script>
</body>
</html>